str1 = input("请输入字符串:")
arr=[]
arr1=[]
q=0
w=-1
for i in str1:
    a = i

    for i in str1:
        if i not in arr:
            arr.append(i)

for j in range(len(arr)):
    if arr[j] in str1:
          count = 0
          for e in str1:
              if arr[j]== e :
                  count+=1
          arr1.append(count)

          print(arr[j],count)
for e in arr1:
    max = 0
    if e > max:
        max = e
for o in arr1:
    w+=1
    if o == max:
        print(arr[w])





